#include<bits/stdc++.h>
using namespace std;
const int P = 1<<10;
const int N = 1e5+10;
const int MOD = 998244353;
int cnt[P];
int f[P];
int jc[N];
int jc_1[N];
int qpow(int x,int p){
    int res = 1;
    while(p){
        if(p & 1){
            res = 1ll*res*x%MOD;
        }
        x = 1ll*x*x%MOD;
        p >>= 1;
    }
    return res;
}
int C(int n,int m){
    if(m < 0){
        return 0;
    }
    if(n < m){
        return 0;
    }
    return 1ll*jc[n]*jc_1[n - m]%MOD*jc_1[m]%MOD;
}
const int INV2 = (MOD + 1)/2;
void IFWT(){
    for(int i = 1;i <= 10;i++){
        int len = 1<<i;
        int hlen = len>>1;
        for(int j = 0;j < P;j += len){
            for(int k = 0;k < hlen;k++){
                int va = f[j + k],vb = f[j + k + hlen];
                f[j + k] = 1ll*INV2*(va + vb)%MOD;
                f[j + k + hlen] = 1ll*INV2*(va - vb + MOD)%MOD;
            }
        }
    }
}
int main(){
    int n,m,k;
    cin>>n>>m>>k;
    jc_1[0] = jc[0] = 1;
    for(int i = 1;i<=n;i++){
        jc[i] = 1ll*jc[i - 1]*i%MOD;
    }
    jc_1[n] = qpow(jc[n],MOD - 2);
    for(int i = n - 1;i >= 1;i--){
        jc_1[i] = 1ll*jc_1[i + 1]*(i + 1)%MOD;
    }
    for(int i =1;i<=n;i++){
        int x;
        cin>>x;
        cnt[x]++;
    }
    int ans = 0;
    for(int i = 0;i < P;i++){
        int tot = 0;
        for(int j = 0;j < P;j++){
            if((__builtin_popcount(i & j) & 1) == 0){
                tot+=cnt[j];
            }
        }
        for(int j = 0;j <= m;j++){
            f[i] = (f[i] + 1ll*C(tot,j)*C(n - tot,m - j)%MOD*(((m - j) & 1)?MOD-1:1)%MOD)%MOD;
        }
    }
    IFWT();
    cout<<f[k]<<'\n';
}